package ru.braim.weather_app.utils.validators.models;

import ru.braim.weather_app.dto.account.AccountRequestDTO;
import ru.braim.weather_app.models.Account;

public class AccountValidator {

    public static Account getValidAccount(AccountRequestDTO accountDTO) {
        Account account = new Account();

        if (
                account.setFirstName(accountDTO.getFirstName()) &&
                        account.setLastName(accountDTO.getLastName()) &&
                        account.setEmail(accountDTO.getEmail()) &&
                        account.setPassword(accountDTO.getPassword())) {
            return account;
        }

        return null;



    }

}
